const fs = require('fs')
const path = require('path')

// 确保 vue-demi 使用 Vue 3 版本
const vueDemiPath = path.resolve(__dirname, 'node_modules/vue-demi')
if (fs.existsSync(vueDemiPath)) {
  fs.writeFileSync(
    path.join(vueDemiPath, 'lib/index.cjs'),
    `module.exports = require('./v3/index.cjs')`
  )
} 